package com.anolesoft.amljmes.fortysix.service.impl;

import com.anolesoft.amljmes.fortysix.dto.BaoZhangZhuangEmpDTO;
import com.anolesoft.amljmes.fortysix.dto.MesBzzBindDto;
import com.anolesoft.amljmes.fortysix.service.info.MesBzzBindService;
import com.anolesoft.amljmes.fortysix.service.mapper.MesBzzBindServiceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MesBzzBindServiceImpl implements MesBzzBindService {
    @Autowired
    MesBzzBindServiceMapper mesBzzBindServiceMapper;

    @Override
    public List<MesBzzBindDto> queryMesBzzBind(String ptdmxObj) {
        return mesBzzBindServiceMapper.queryMesBzzBind(ptdmxObj);
    }

    @Override
    public List<MesBzzBindDto> queryMesBzzBinds(String ptdObj) {
        return mesBzzBindServiceMapper.queryMesBzzBinds(ptdObj);
    }

    @Override
    public List<MesBzzBindDto> queryStateNum(String ptdObj) {
        return mesBzzBindServiceMapper.queryStateNum(ptdObj);
    }

    @Override
    public List<MesBzzBindDto> queryState(String ptdObj) {
        return mesBzzBindServiceMapper.queryState(ptdObj);
    }

    @Override
    public int queryStateJy(String objuid) {
        int count = mesBzzBindServiceMapper.queryStateJy(objuid);
        return count;
    }

    @Override
    public int queryStateXh(String objuid) {
        int count = mesBzzBindServiceMapper.queryStateXh(objuid);
        return count;
    }

    @Override
    public int addMesBzzBind(MesBzzBindDto inFoDtoParam) {
        int count = mesBzzBindServiceMapper.addMesBzzBind(inFoDtoParam);
        return count;
    }

    @Override
    public int deleteMesBzzBind(List<String> objuids) {
        int count = 0;
        for(String objuid : objuids) {
            count += mesBzzBindServiceMapper.deleteMesBzzBind(objuid);
        }
        return count;
    }

    @Override
    public int updateMesBzzBind(String objuid,int num1) {
        return mesBzzBindServiceMapper.updateMesBzzBind(objuid,num1);
    }

    @Override
    public int updateBindJystate(String objuid,String jianyanren) {
        return mesBzzBindServiceMapper.updateBindJystate(objuid,jianyanren);
    }

    @Override
    public List<BaoZhangZhuangEmpDTO> queryEmpEid(String cdh) {
        List<BaoZhangZhuangEmpDTO> jianyanNameAll=mesBzzBindServiceMapper.queryEmpEid(cdh);
        return jianyanNameAll;
    }

    @Override
    public int updateBindXh(List<String> objuids) {
        int count = 0;
        for(String objuid : objuids) {
            count += mesBzzBindServiceMapper.updateBindXh(objuid);
        }
        return count;
    }
}
